Previous Book Contents Book Index Next

Inside Macintosh: Overview /
Chapter 8 - Menus


About Menus

A menu is a user interface element that your application can create to allow the user to view or choose an item from a list of commands and options that your application provides. For example, the sample application Venn Diagrammer provides a menu (shown in Figure 8-1) that contains a list of commands for manipulating Venn diagrams.

Figure 8-1 A typical pull-down menu

This kind of menu is known as a pull-down menu, because the user "pulls down" the menu by clicking the menu title (the word "Venn" in the menu bar). A pull-down menu always has associated with it one or more menu items, rectangles containing text and other characteristics that identify a command that the user can choose to perform an action. The menu shown in Figure 8-1 contains six menu items and one divider (the gray line used to separate the first five items from the last one). In addition, four of the menu items in that menu have keyboard equivalents associated with them. The user can invoke the menu command by pressing the appropriate combination of characters on the keyboard. For example, the user can make the Preferences dialog box appear by pressing the combination Command-Y.

Note
This chapter shows how to create and handle pull-down menus only. The word "menu" should therefore be understood to mean "pull-down menu."
The Menu Manager provides routines that allow you to create your application's menu bar and menus, and to handle user actions in the menu bar and in individual menus. You'll call these routines when you detect that a mouse-down event has occurred in the menu bar or when you detect that the user has typed a keyboard equivalent of a menu command. You'll also call the Menu Manager to perform other operations on menus, such as changing menu item text or enabling and disabling menu items.

All Macintosh applications should support at least three standard menus: the Apple menu, the File menu, and the Edit menu. In addition, you'll want to support other menus that contain commands and options specific to your application. The Venn Diagrammer application supports only one application-specific menu along with the three standard menus.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
9 JUL 1996